<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragram" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache, must-revalidate"/>
    <meta http-equiv="expires" content="0"/>
    <meta name="renderer" content="webkit"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>咨询管理</title>
    <link rel="stylesheet" href="/assets/css/lib/pagination.css">
    <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/consult_manage.css">
</head>
<body>
<div id="cms">
    <jsp:include page="title_bar.jsp"/>
    <jsp:include page="tab_bar.jsp"/>
    <div class="cms-content">
        <div class="current-place">
            <div class="place-title">当前位置:</div>
            <div class="place-val">首页/咨询管理</div>
        </div>
        <div class="seek-box">
            <div class="common-title">
                <div class="common-left-line"></div>
                <div class="common-text">条件查询</div>
            </div>
            <div class="seek-content">
                <div class="seek-group">
                    <div class="seek-unit">
                        <span class="seek-unit-left">客户姓名</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control client-name">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">客户电话</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control client-phone">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">律师姓名</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control lawyer-name">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">律师电话</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control lawyer-phone">
                        </div>
                    </div>
                </div>
                <div class="seek-group">
                    <div class="seek-unit">
                        <span class="seek-unit-left">发起时刻</span>
                        <div class="seek-unit-right">
                            <input type="text" class="Wdate " id="start-time"/>
                            <span>-</span>
                            <input type="text" class="Wdate " id="end-time"/>
                        </div>
                    </div>
                    <div class="seek-unit">
                        <span class="seek-unit-left">通话时长(含)</span>
                        <div class="seek-unit-right">
                            <input type="text" class="form-control start-num">
                            <span>-</span>
                            <input type="text" class="form-control end-num">
                        </div>
                    </div>
                    <div class="seek-unit">
                        <div class="seek-unit-left seek-btn"  >
                            查询
                        </div>
                        <div class="seek-unit-right seek-clear">
                            清空条件
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="table-box">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>
                        <div>客户姓名</div>
                    </th>
                    <th>
                        <div>客户手机号</div>
                    </th>
                    <th>
                        <div>律师姓名</div>
                    </th>
                    <th>
                        <div>律师手机号</div>
                    </th>
                    <th class="create-time sequence isdown" style="min-width: 80px" pxzd="create-time">
                        <div>
                            <span>发起时刻</span>
                            <img src="/assets/images/up.png" class="up">
                            <img src="/assets/images/down.png" class="down">
                            <img src="/assets/images/default_status.png" class="default">
                        </div>
                    </th>
                    <th class="call-time sequence" style="min-width: 80px" pxzd="call-time">
                        <div>
                            <span>通话时长(秒)</span>
                            <img src="/assets/images/up.png" class="up">
                            <img src="/assets/images/down.png" class="down">
                            <img src="/assets/images/default_status.png" class="default">
                        </div>

                    </th>
                    <th style="min-width: 70px">
                        <div>
                            <span>通话发起方</span>
                            <select class="form-control start" id="formInit">
                                <option value="">全部</option>
                                <option value="1">律师</option>
                                <option value="0">客户</option>
                            </select>
                        </div>
                    </th>
                    <th style="min-width: 70px">
                        <div>
                            <span>发起场景</span>
                            <select class="form-control scene" id="proName_select">
                                <option value="">全部</option>
                            </select>
                        </div>

                    </th>
                    <th style="min-width: 70px">
                        <div>
                            <span>通话结果</span>
                            <select class="form-control client-status" id="callStatus_select">
                                <option value="">全部</option>
                                <option value="1#1">主叫方挂断</option>
                                <option value="1#2">被叫方挂断</option>
                                <option value="2#1">主叫方未接通</option>
                                <option value="2#2">被叫方未接通</option>
                                <option value="3#1">主叫方拒接</option>
                                <option value="3#2">被叫方拒接</option>
                                <option value="4#">拨打失败</option>
                                <option value="5#">异常状态</option>
                            </select>
                        </div>
                    </th>
                    <th style="min-width: 70px">
                        <div>
                            <span>通话有效性</span>
                            <select class="form-control client-status" id="isEffective_select">
                                <option value="">全部</option>
                                <option value="0">无效</option>
                                <option value="1">有效</option>
                            </select>
                        </div>
                    </th>
                    <th style="min-width: 70px">
                        <div>
                            <span>通话质量</span>
                            <div><input type="checkbox" id="quality"><label for="quality">优质通话</label></div>
                        </div>

                    </th>
                    <th>
                        <div>用户消费金额</div>
                    </th>
                    <th>
                        <div>律师收入金额</div>
                    </th>


                    <th style="min-width: 40px">
                        <div>录音</div>
                    </th>
                </tr>
                </thead>
                <tbody id="tbody1">

                </tbody>
                <script id="list1" type="text/html">
                    <!for(k in result){
                    var v=result[k];
                    !>
                    <tr>
                        <td class="uname"><a href="/user/showDetail?uid=<!=v.userid!>"><!=v.uname==null?'':v.uname!></a></td>
                        <td class="uphone"><!=v.uphone==null?'':v.uphone!></td>
                        <td class="lawyername"><a href="/lawyer/findLawyerDetailInfo?lawyerid=<!=v.lawyerid!>"><!=v.lawyername==null?'':v.lawyername!></a></td>
                        <td class="lawyerPhone"><!=v.lawyerPhone==null?'':v.lawyerPhone!></td>
                        <td class="starttime"><!= getFormatDate(v.starttime)!></td>
                        <td class="calledDuration"><!=v.calledDuration==null?'':v.calledDuration!></td>
                        <td class="initiator"><!=v.initiatorStr==null?'':v.initiatorStr!></td>
                        <td class="proName"><!=v.proName==null?'':v.proName!></td>
                        <td class="callStatus"><!=  backCallState(v.callStatus,v.rejectStatus) !></td>
                        <td class="isEffective"><!=v.isEffectiveStr==null?'':v.isEffectiveStr!></td>
                        <td class="isGoodCall"><!=v.yzth==null?'':v.yzth!></td>
                        <td class="money"><!= back_money_handler(v.money/100)!></td>
                        <td class="lawyerMoney"><!= back_money_handler(v.lawyerMoney/100)!></td>
                        <td class="voiceUrl" style="display: none"><!=v.voiceUrl!></td>
                        <td class="stoptime" style="display: none"><!=getFormatDate(v.stoptime)!></td>
                        <td class="id" style="display: none"><!=v.id!></td>
                        <td class="">
                            <div class='audio-btn' srcurl= '' onclick="audioClick(this)" >
                                <img src='/assets/images/audio.png' alt=''  >
                                <span>录音</span></div>
                        </td>
                    </tr>
                    <!}!>
                </script>


            </table>
            <div class="table-bottom clearfix">
                <div id="Pagination" class="pagination"><!-- 这里显示分页--></div>
                <span id="currentCount"></span>
            </div>
        </div>

    </div>
</div>
<div class="cms-modal-ms" id="freeze-info">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">操作提醒</div>
        <div class="cms-madal-content">
            <div class="freeze-quesition"> 确定要将选中的12个用户冻结吗?</div>
            <div class="freeze-info">冻结后客户将不能实现咨询、关注律师、更换专属律师 、充值等功能。</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm freeze-confirm">确定</button>
            <button type="button" class="cms-cancel freeze-cancel">取消</button>
        </div>
    </div>
</div>
<div class="cms-modal-lg" id='edit-material'>
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">编辑信息</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">姓名</div>
                    <div class="state-right">

                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left not-edit">手机号</div>
                    <div class="state-right edit-client-phone"></div>
                </div>
            </div>

            <div class="two-stage">
                <div class="state-left">状态</div>
                <div class="state-right">
                    <select class="form-control edit-client-status">
                        <option value="">全部</option>
                        <option value="">正常</option>
                        <option value="">冻结</option>
                    </select>
                </div>
            </div>
            <div>状态修改为冻结后客户将不能实现咨询、关注律师、更 换专属律师、充值等行为。</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm edit-confirm">确定</button>
            <button type="button" class="cms-cancel edit-cancel">取消</button>
        </div>
    </div>
</div>

<div class="cms-modal-lg" id="audio-detail">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">
            通话详情
            <div class="cms-modal-close">x</div>
        </div>
        <div class="cms-madal-content">
            <div class="table-box">
                <table class="table table-bordered">
                    <tr>
                        <td class="left-title">ID</td>
                        <td class="right-content" id="id_kp"></td>
                        <td class="left-title">发起方</td>
                        <td class="right-content" id="initiator_kp"></td>
                        <td class="left-title">通话时长</td>
                        <td class="right-content" id="calledDuration_kp"></td>
                        <td class="left-title">是否有效</td>
                        <td class="right-content" id="isEffective_kp"></td>
                    </tr>
                    <tr>
                        <td class="left-title">客户姓名</td>
                        <td class="right-content" id="uname_kp"></td>
                        <td class="left-title">客户电话</td>
                        <td class="right-content" id="uphone_kp"></td>
                        <td class="left-title">律师姓名</td>
                        <td class="right-content" id="lawyername_kp"></td>
                        <td class="left-title">律师电话</td>
                        <td class="right-content" id="lawyerPhone_kp"></td>
                    </tr>
                    <tr>
                        <td class="left-title">发起时间</td>
                        <td class="right-content" id="starttime_kp"></td>
                        <td class="left-title">结束时间</td>
                        <td class="right-content" id="stoptime_kp"></td>
                        <td class="left-title">通话结果</td>
                        <td class="right-content" id="callStatus_kp"></td>
                        <td class="left-title">通话质量</td>
                        <td class="right-content" id="isGoodCall_kp"></td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="cms-modal-bottom">
            <audio id="voiceUrl_kp" src="" controls>

            </audio>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/assets/js/lib/jquery-1.12.3.js"></script>
<script type="text/javascript" src="/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/lib/modal.js"></script>
<script type="text/javascript" src="/assets/js/lib/cmsmodal.js"></script>

<script type="text/javascript" src="/assets/js/lib/distpicker.data.js"></script>
<script type="text/javascript" src="/assets/js/lib/distpicker.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.pagination.js"></script>

<script type="text/javascript" src="/assets/js/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/assets/js/common.js"></script>
<script type="text/javascript" src="/assets/js/communal/template.js"></script>
<script type="text/javascript" src="/assets/js/call_manage.js"></script>
</html>